package com.tencent.wxcloudrun.service;

import com.tencent.wxcloudrun.dao.RoleMapper;
import com.tencent.wxcloudrun.model.Role;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: RoleService
 * Package: com.tencent.wxcloudrun.service
 * Description:
 *
 * @Date: 2023/1/23 2:04 PM
 * @Author: wht
 */
@Slf4j
@Service
public class RoleService {
    @Autowired
    RoleMapper roleMapper;

    public void addOneRole(Role role) {
        roleMapper.addOneRole(role);
    }

    public void updateOneRoleById(Role role) {
        roleMapper.updateOneRoleById(role);
    }

    public List<Role> getRoleListAll() {
        return roleMapper.getRoleListAll();
    }

    public Role getOneRoleById(Integer id) {
        return roleMapper.getOneRoleById(id);
    }
}
